package com.dimanche.module_home.ui;

import android.app.Application;

import androidx.annotation.NonNull;
import androidx.databinding.ObservableField;

import com.dimanche.library_base.utils.RouterUtil;

import me.goldze.mvvmhabit.base.BaseViewModel;
import me.goldze.mvvmhabit.binding.command.BindingAction;
import me.goldze.mvvmhabit.binding.command.BindingCommand;

/**
 * author : Dimanche
 * date   : 2021/3/8 15:19
 * desc   :
 * version: 1.0
 */
public class HomeViewModel extends BaseViewModel {

    public ObservableField<String> userName = new ObservableField<>();


    public HomeViewModel(@NonNull Application application) {
        super(application);
        userName.set("你好，老与不老");
    }

    public BindingCommand openCourse = new BindingCommand((BindingAction) () -> {
        RouterUtil.launchCourse();
    });


}
